Threads are usually constrained to execute according to a strict schedule. When a processing systems experiences a stall (or bubble) in which there is a delay and/or fault in executing a particular thread, subsequent threads may be delayed as well. For example, a thread requiring data in a register that is currently being written to may force the processing system to stall the thread until the register is available to be loaded. Thus, even a small delay in a thread may cause a ripple effect that delays every subsequent thread regardless of whether subsequent threads are dependent on the delayed thread. This can be problematic in a variety of environments, especially in time sensitive environments in which a strict amount of processing time may be allotted to particular threads.
In certain execution environments stalls may prevent entire tasks from executing. For example, in time sensitive environments, failure to execute within an allotted stages may force an interrupt that prevents remaining threads from executing. A set of threads may fail due to a stalled thread. A stall or fault in a thread may have a cascading effect reducing the number of threads the environment is able to execute within a processing window if not causing the system to crash. For example, resource exhaustion (i.e., thrashing), infinite looping subtasks, memory faults, or prefetching faults may prevent a thread from instantiating or terminating appropriately. As a result, the thread may not terminate and a subsequent threads may be prevented from instantiating causing the system to crash.
There is a need in the art for improved methods and systems related to defining and scheduling threads for execution.